my_str = "黑马程序员"
index = 0
while index < len(my_str):
    print(my_str[index])
    index += 1
print("-----------------")
for i in my_str:
    print(i)

str = "itheima itcast boxuegu"
num = str.count("it")
print(f"字符串itheima itcast boxuegu中有：{num}个it字符")
str_rep = str.replace(" ", "|")
print("字符串itheima itcast boxuegu被替换空格后，结果：%s" % str_rep)
str_sp = str_rep.split("|")
print(f"字符串itheima itcast boxuegu，按|分隔后，得到：%s" % str_sp)
